Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport memory pressure callback to 1.9 #114

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Dec 6, 2023

PR Description

Backports the memory pressure callback to 1.9.

Requirements for merging:

  • I have opened an issue or PR upstream on JuliaLang/julia: Page based heap size heuristics JuliaLang/julia#50144
  • I have removed the port-to-* labels that don't apply.
  • I have opened a PR on raicode to test these changes: I believe it's not applicable, since we're not using it in raicode, but happy to introduce a few tests in raicode.

@github-actions github-actions bot added port-to-v1.10 This change should apply to Julia v1.10 builds port-to-master This change should apply to all future Julia builds port-to-v1.9 This change should apply to Julia v1.9 builds labels Dec 6, 2023
@d-netto d-netto removed the port-to-master This change should apply to all future Julia builds label Dec 13, 2023
@d-netto d-netto requested a review from kpamnany December 13, 2023 16:06
@d-netto d-netto force-pushed the dcn-memory-pressure-callback branch from 95300b4 to e23808b Compare December 13, 2023 16:12
@d-netto
Copy link
Member Author

d-netto commented Dec 13, 2023

MWE that should give some guidance on how to use:

using Printf

function mem_pressure_callback()
        @printf "memory pressure callback called\n"
end

callback_as_cfunction = @cfunction(mem_pressure_callback, Cvoid, ())

ccall(:jl_gc_set_cb_notify_gc_pressure, Cvoid, (Ptr{Cvoid}, Cint), callback_as_cfunction, true)

GC.gc()

Testing the callback with a low --heap-size-hint :

./julia --heap-size-hint=40k mwe.jl 
memory pressure callback called

--heap-size-hint=500M (or any large value) doesn't output anything, as expected.

@d-netto d-netto merged commit 4f8508d into v1.9.2+RAI Dec 13, 2023
1 check passed
@d-netto d-netto deleted the dcn-memory-pressure-callback branch December 13, 2023 16:38
@d-netto d-netto removed the port-to-v1.10 This change should apply to Julia v1.10 builds label Jan 2, 2024
d-netto added a commit that referenced this pull request Jan 2, 2024
@d-netto d-netto removed the port-to-v1.9 This change should apply to Julia v1.9 builds label Jan 2, 2024
d-netto added a commit that referenced this pull request Jan 2, 2024
DelveCI pushed a commit that referenced this pull request Jan 6, 2024
Drvi pushed a commit that referenced this pull request Jan 8, 2024
DelveCI pushed a commit that referenced this pull request Jan 13, 2024
DelveCI pushed a commit that referenced this pull request Jan 14, 2024
DelveCI pushed a commit that referenced this pull request Jan 15, 2024
DelveCI pushed a commit that referenced this pull request Jan 17, 2024
DelveCI pushed a commit that referenced this pull request Jan 18, 2024
DelveCI pushed a commit that referenced this pull request Jan 23, 2024
DelveCI pushed a commit that referenced this pull request Jan 24, 2024
DelveCI pushed a commit that referenced this pull request Jan 25, 2024
DelveCI pushed a commit that referenced this pull request Jan 27, 2024
DelveCI pushed a commit that referenced this pull request Jan 30, 2024
DelveCI pushed a commit that referenced this pull request Jan 31, 2024
DelveCI pushed a commit that referenced this pull request Feb 1, 2024
DelveCI pushed a commit that referenced this pull request Feb 6, 2024
DelveCI pushed a commit that referenced this pull request Feb 7, 2024
DelveCI pushed a commit that referenced this pull request Feb 14, 2024
DelveCI pushed a commit that referenced this pull request Feb 21, 2024
DelveCI pushed a commit that referenced this pull request Feb 22, 2024
Drvi pushed a commit that referenced this pull request Feb 28, 2024
DelveCI pushed a commit that referenced this pull request Mar 1, 2024
DelveCI pushed a commit that referenced this pull request Mar 13, 2024
Drvi pushed a commit that referenced this pull request Apr 3, 2024
d-netto added a commit that referenced this pull request Apr 16, 2024
DelveCI pushed a commit that referenced this pull request Apr 23, 2024
DelveCI pushed a commit that referenced this pull request Apr 24, 2024
DelveCI pushed a commit that referenced this pull request Apr 30, 2024
DelveCI pushed a commit that referenced this pull request Apr 30, 2024
DelveCI pushed a commit that referenced this pull request May 2, 2024
DelveCI pushed a commit that referenced this pull request May 9, 2024
DelveCI pushed a commit that referenced this pull request May 19, 2024
DelveCI pushed a commit that referenced this pull request May 26, 2024
DelveCI pushed a commit that referenced this pull request May 28, 2024
DelveCI pushed a commit that referenced this pull request May 29, 2024
Drvi pushed a commit that referenced this pull request Jun 7, 2024
github-actions bot pushed a commit that referenced this pull request Dec 16, 2024
Stdlib: SHA
URL: https://github.com/JuliaCrypto/SHA.jl.git
Stdlib branch: master
Julia branch: master
Old commit: aaf2df6
New commit: 8fa221d
Julia version: 1.12.0-DEV
SHA version: 0.7.0(Does not match)
Bump invoked by: @inkydragon
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaCrypto/SHA.jl@aaf2df6...8fa221d

```
$ git log --oneline aaf2df6..8fa221d
8fa221d ci: update doctest config (#120)
346b359 ci: Update ci config (#115)
aba9014 Fix type mismatch for `shake/digest!` and setup x86 ci (#117)
0b76d04 Merge pull request #114 from JuliaCrypto/dependabot/github_actions/codecov/codecov-action-5
5094d9d Update .github/workflows/CI.yml
45596b1 Bump codecov/codecov-action from 4 to 5
230ab51 test: remove outdate tests (#113)
7f25aa8 rm: Duplicated const alias (#111)
aa72f73 [SHA3] Fix padding special-case (#108)
3a01401 Delete Manifest.toml (#109)
da351bb Remvoe all getproperty funcs (#99)
4eee84f Bump codecov/codecov-action from 3 to 4 (#104)
15f7dbc Bump codecov/codecov-action from 1 to 3 (#102)
860e6b9 Bump actions/checkout from 2 to 4 (#103)
8e5f0ea Add dependabot to auto update github actions (#100)
4ab324c Merge pull request #98 from fork4jl/sha512-t
a658829 SHA-512: add ref to NIST standard
11a4c73 Apply suggestions from code review
969f867 Merge pull request #97 from fingolfin/mh/Vector
b1401fb SHA-512: add NIST test
4d7091b SHA-512: add to docs
09fef9a SHA-512: test SHA-512/224, SHA-512/256
7201b74 SHA-512: impl SHA-512/224, SHA-512/256
4ab85ad Array -> Vector
8ef91b6 fixed bug in padding for shake, addes testcases for full code coverage (#95)
88e1c83 Remove non-existent property (#75)
068f85d shake128,shake256: fixed typo in export declarations (#93)
176baaa SHA3 xof shake128 and shake256  (#92)
e1af7dd Hardcode doc edit backlink
```

Co-authored-by: Dilum Aluthge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants